<!DOCTYPE html>
<html>
	<head>
		<script type="text/javascript" src="../js/wap_meta.js" ></script>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="../js/jquery-2.1.1.js" ></script>
		<link rel="stylesheet" href="../css/base.css" />
		<script src="../js/jquery.cookie.js"></script>
		<script type="text/javascript" src="../js/base64.js" ></script>
		<script type="text/javascript" src="../js/link.js" ></script>
	</head>
	<style>
		* {
			padding: 0;
			margin: 0;
			font-family: "微软雅黑";
		}
		
		body {
			background: #f0f0f0;
		}
		.title p{
			width: 750px;
			text-align: center;
			font-size: 34px;
			color: #004591;
			padding-top: 26px;
		}
		.back{
			position: absolute;
			top: 30px;
			left: 30px;
		}
		.content{
			position: relative;
			top: 30px;
		}
		.info{
			background: #FFFFFF;
			width: 690px;
			padding: 20px 30px 30px 30px;
			color: #333333;
			font-size: 32px;
			line-height: 60px;
		}
		.comformBtn{
			position: relative;
		}
		.comformBtn img{
			position: absolute;
			top: 24px;
			left: 30px;
			/*width: 26px;
			height: 26px;*/
			/*background: url(../img/activate/check.png);*/
		}
		.comformBtn p{
			position: absolute;
			top: 20px;
			color: #333333;
			font-size: 24px;
			left: 68px;
		}
		
		.comformBtn a{
			text-decoration:none;
		}
		.comform{
			position: relative;
			top: 130px;
			padding-left: 30px;
			padding-bottom: 100px;
		}
	</style>
	<body>
		<div class="title">
			<p id="title">公益护照激活说明</p>
			<img class="back" src="../img/activate/back.png" />
		</div>
		<div class="content">
			<div class="info">
				尊敬的用户：<br />
				感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。感谢您对平安银行的信任并购买平安理财产品。
			</div>
			<div class="comformBtn">
				<!--<input type="checkbox">-->
				<img datainfo="0" class="check" src="../img/activate/check.png" />
				<!--<p>我已经阅读并同意<a href="activate.html">《公益护照激活说明书》</a></p>-->
			</div>
			<img class="comform" src="../img/activate/next.png" />
		</div>
		<script>
			function getQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
				var r = window.location.search.substr(1).match(reg);
				if(r != null) {
					return unescape(r[2]);
				}
				return null;
			}
			var passportNo = getQueryString("passportNo");
			var channelCode = getQueryString("channelCode");
			var businessCode = getQueryString("businessCode");
			var groupCode = getQueryString("groupCode");
			var idNo = getQueryString("idNo");
			var mobile = getQueryString("mobile");
			var realName = BASE64.decode(getQueryString("realName"));
			
			$.cookie("passportNo",passportNo);
			$.cookie("channelCode",channelCode);
			$.cookie("businessCode",businessCode);
			$.cookie("groupCode",groupCode);
			$.cookie("idNo",idNo);
			$.cookie("mobile",mobile);
			$.cookie("realName",realName);
			
			var obj = new Object();
			obj.businessCode = $.cookie("businessCode");
			obj.passportNo = $.cookie("passportNo");
			obj.channelCode = $.cookie("channelCode");
			obj.groupCode = $.cookie("groupCode");
			obj.idNo = $.cookie("idNo");
			obj.mobile = $.cookie("mobile");
			obj.realName = $.cookie("realName");
			
			$.ajax({
				url: linkObj.info,
				type: "post",
		        dataType : 'json',  
				data: JSON.stringify(obj),
    			contentType: "application/json",  
				success: function(data) {
					if(data.success == true) {
						$("#title").html(data.obj.channelExplain.title);
						$(".info").html(data.obj.channelExplain.demo);
						var str = "";
						str += "<p>我已经阅读并同意<a href="+data.obj.channelExplain.detailUrl+">《" +data.obj.channelExplain.detailTitle+ "》</a></p>";
						$(".comformBtn").append(str);
					} else {
						alert(data.msg)
					}
				}
			});
			

			$(".check").click(function(){
				if($(".check").attr("datainfo") == "0"){
					$(".check").attr("datainfo","1");
					$(".check").attr("src","../img/activate/checked.png");
				}else{
					$(".check").attr("datainfo","0")
					$(".check").attr("src","../img/activate/check.png");
				}
			})
			$(".back").click(function(){
				javascript:history.go(-1);
			})
			$(".comform").click(function(){
				if($(".check").attr("datainfo") == "0"){
					alert("请勾选");
					return;
				}
				if(idNo){
					$.ajax({
						url: linkObj.openAccont,
						type: "post",
				        dataType : 'json',  
						data: JSON.stringify(obj),
		    			contentType: "application/json",  
						success: function(data) {
							if(data.success == true) {
								document.location = data.obj.openUrl;
							} else {
								alert(data.msg)
							}
						}
					});
				}else{
					document.location = "activateInput.html";
				}
			})
			setTimeout(function(){
				$(".check").click();
				$(".comform").click();
			},0)
		</script>
	</body>
</html>